<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="com.yaodian100.ec.coupon.entity.CouponItem"%>
<%@page import="com.yaodian100.ec.coupon.entity.Coupon"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="com.yaodian100.core.common.utils.DateUtil"%>
<%@page import="org.apache.commons.lang.time.DateUtils"%>
<%@page import="java.util.Date"%>
<%@page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<html>
<head>
<link rel="stylesheet" href="/css/table_sorter.css" type="text/css" id="" media="print, projection, screen" />
<link rel="stylesheet" href="/css/jtips.css" type="text/css" id="" media="print, projection, screen" />
<script type="text/javascript" charset="UTF-8" src="/js/jquery.tablesorter.js"></script>
<script type="text/javascript" charset="UTF-8" src="/js/jquery.metadata.js"></script>
<script type="text/javascript" charset="UTF-8" src="/js/jquery.tablesorter.pager.js"></script>
<script src="/js/jtip.js"></script>
</head>
<body>
<%
@SuppressWarnings("unchecked")
List<CouponItem> couponList = (List<CouponItem>)request.getAttribute("couponList");
DateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd");
CouponItem couponItem;
%>
  <!-- content start -->
  <div class="content">
    <!-- 我的訂單 -->
    <h2>我的礼券</h2>
    <!-- 禮券狀況 -->
	
   	  <div class="my-coupon">
        	<span><strong>目前可用礼券：<s:property value="" /></strong><br />
        	<b id="coupon_size">${canUseCoupon}</b>张礼券，共计<em id="coupon_canuse">${canUse}</em>元</span>
        </div>
       	<%if(StringUtils.isNotBlank(request.getAttribute("nearlyD").toString())){ %>
       	<div class="my-point-timesup">
       	<span><strong>最近即将到期的一张礼券：</strong><br />
       	<i>${nearlyD}</i> (${lastCouponCode}) 即将到期：<b>${nearlyValue}</b></span>元
       	</div>
       	<%} %>
      
    <!-- 禮券狀況 -->
    <div class="mb-show">
      <ul class="mb-tab">
        <li id="acc_li" class="mb-tab-f"><a href="#" onclick="doAR('<%=ServerValue.getFrontContextPath()%>/member/myCoupon/accumulatecoupon.do?AJAX=true&refreshZone=tab','tab')">目前可用礼券</a></li>
        <li id="wait_li"><a href="#" onclick="doAR('<%=ServerValue.getFrontContextPath()%>/member/myCoupon/waitcoupon.do?AJAX=true&refreshZone=tab','tab')">待生效礼卷</a></li>
        <li id="use_li"><a href="#" onclick="doAR('<%=ServerValue.getFrontContextPath()%>/member/myCoupon/tousecoupon.do?AJAX=true&refreshZone=tab','tab')">使用明细</a></li>
        <li id="get_li"><a href="#" onclick="doAR('<%=ServerValue.getFrontContextPath()%>/member/myCoupon/togetcoupon.do?AJAX=true&refreshZone=tab','tab')">礼券充值</a></li>
      </ul>
      <div class="a-function"><a href="/help/3_coupons.html" target="_blank">礼券说明</a></div>
      <p class="LH-1of5"></p>
      
      <div id="tab">
		<tiles:insertAttribute name="displayCoupon" ignore="true" />
      </div>
      
      
    </div>
    <!-- 我的訂單 -->
  </div>
  <!-- content end -->
</body>
</html>